package com.datam.dao;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import com.datam.domain.CompanyPkYjDO;

public interface YJDAO {

	public List<Map> selectZyjByCid(@Param("id")long id);

	public List<Map> selectpkyjBypkid(@Param("pkid")long pkid);

	public int insertpkyj(CompanyPkYjDO companyPkYjDO);

	public int updatepkyj(@Param("id")Long id, @Param("state")String state);

	public void insertyj(@Param("ID")Long iD, @Param("COMPANYID")long cOMPANYID, @Param("ITEMCODE")String iTEMCODE,
			@Param("STATE")String sTATE, @Param("VALUE")String vALUE);

	public int updatepkyjByDo(CompanyPkYjDO companyPkYjDO);

	public void updateyj(@Param("ID")Long iD, @Param("COMPANYID")long cOMPANYID, @Param("ITEMCODE")String iTEMCODE,
			@Param("STATE")String sTATE, @Param("VALUE")String vALUE);

	public void AddZyj( @Param("COMPANYID")Long companyID,  @Param("STATE")String STATE, @Param("OFFLINETIME") String OFFLINETIME,
			 @Param("YEARPERCENT")String YEARPERCENT,  @Param("NOCHANGEHOUR")String NOCHANGEHOUR,  @Param("NOCHANGEPERCENT")String NOCHANGEPERCENT);

	public void upZyj(@Param("ID")Long ID, @Param("COMPANYID")Long companyID,  @Param("STATE")String STATE, @Param("OFFLINETIME") String OFFLINETIME,
			 @Param("YEARPERCENT")String YEARPERCENT,  @Param("NOCHANGEHOUR")String NOCHANGEHOUR,  @Param("NOCHANGEPERCENT")String NOCHANGEPERCENT);

	@Select("select a.code,b.ITEMCODE,b.OUTPUTSTANDARD,b.STATE from company_pk_info a,company_pk_yj b where a.id=b.PKID and state =1 ")
	public List<Map> selectPkyjByStatus();
	
	@Select("select * from pfl_info")
	public List<Map> selectPfl();
	
	@Select("insert into pfl_info(nm_id,code,value)values(#{nm_id},#{code},#{value})")
	public void insertPfl( @Param("code")String code,@Param("nm_id")String nm_id,   @Param("value") Float value);
	
	@Select("update  pfl_info set value=#{value} where nm_id=#{nm_id} and code=#{code}")
	public void updatePfl(@Param("nm_id")String nm_id,  @Param("code")String code, @Param("value") Float value);

	@Select("select * from company_zyj")
	public List<Map> selectZyj();

	
	@Select("insert into company_wx_info (IMG_URL,WX_NAME,ID,COMPANYID)values(#{IMG_URL},"
			+ "#{WX_NAME},#{ID},#{COMPANYID})")
	public void insertWxInfo(@Param("IMG_URL")String IMG_URL, @Param("WX_NAME")String WX_NAME, 
			@Param("ID")String ID,@Param("COMPANYID")String COMPANYID);

	@Select("select * from   company_wx_info where COMPANYID=#{COMPANYID}")
	public List<Map> GetWXInfoList(String COMPANYID);
	
	@Select("delete  from   company_wx_info where COMPANYID=#{COMPANYID} and ID =#{ID}")
	public void deleteWXInfo(@Param("COMPANYID")String COMPANYID,@Param("ID")String ID);


}
